<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    template="/pages/template.xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>    
<ui:define name="content">
<f:view>
	<h:form> 
		<h:messages/>
		<rich:spacer height="22px" width="100%"/>
		<span style="margin-left: 20px">
		<h:panelGrid columns="1" width="99%" styleClass="cabecalhoUC">
		  <h:outputLabel value="Cadastro de Produto"/>
		</h:panelGrid>
		</span>
		
		<rich:spacer height="22px" width="100%"/>
			
			<table>
			    <tr>
			   		<td> <h:outputLabel for="ean" value="EAN:" /></td>
					<td> <h:inputText styleClass="campoStyle1" id="ean" value="#{produtoMB.produtoTO.ean}" style=" width:100px; "/> </td>
			    </tr>
			    
			    <tr>			    
			    	<td><h:outputLabel for="descricao" value="Descrição:" /></td>
					<td><h:inputText styleClass="campoStyle1" id="descricao" required="true" value="#{produtoMB.produtoTO.descricao}" style=" width : 300px;" /> </td>
				</tr>
				
				<tr>
					<td><h:outputLabel for="desc_reduzida" value="Descrição Reduzida:" /> </td>
					<td><h:inputText styleClass="campoStyle1" id="desc_reduzida" required="true" value="#{produtoMB.produtoTO.descricaoReduzida}" style=" width:170px;" /> </td>
				</tr>
				
				<tr>
				<td><h:outputLabel for="url" value="URL:" /></td>
				<td><h:inputText styleClass="campoStyle1" id="url" required="true" value="#{produtoMB.produtoTO.url}" style=" width : 200px;" /> </td>
               </tr>
        	
         	</table>		
			<rich:spacer height="22px" width="99%"/>
			
			<span style="text-align: left;">
			<h:panelGroup styleClass="botoes">
				<h:commandButton value="Cancelar" action="#{produtoMB.cancelar}"/>
				<h:commandButton value="Salvar" action="#{produtoMB.salvar}"/>
    		</h:panelGroup>
    		</span>
			 <a4j:region id="regiaoAjax">
			 	<a4j:status id="sts">
	            	<f:facet name="start">
	            		<h:graphicImage value="/images/ajax-loader.gif" />
	               	</f:facet>
	            </a4j:status>
	         </a4j:region>
	</h:form>
</f:view>
</ui:define>
</ui:composition >
